<template>
  <view class="content" v-if="isShow" @click="isShow=false">
    <view class="shop" @click.stop="">
      <view class="user">
        <view class="user-img">
          <image :src="shopInfo.avatar"></image>
        </view>
        <view class="user-info">
          <view class="username">{{ shopInfo.name }}</view>
          <view class="user-desc">我承诺，我将竭诚为您服务</view>
        </view>
      </view>
      <view class="qcode">
        <image :show-menu-by-longpress="true" :src="shopInfo.qrCode"></image>
      </view>
      <view class="qcode-message">长按二维码，添加店长</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      shopInfo: {},
      config: {},
      isShow: false
    }
  },
  methods: {
    async getQcode(inviteCode) {
      const form_data = {
        inviteCode: inviteCode
      }
      // const {data} = await this.$NoteApi.doRequest("get", 'inviter/getQrInfo', form_data, 'json', true)
      const {data} = await this.$NoteApi.doRequest("get", 'inviter/getQrInfoV2', form_data, 'json', true)
      this.shopInfo = data.data
    },
  }
}
</script>

<style>
.content {
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, .5);
  position: fixed;
  top: 0;
  left: 0;
}


.shop {
  width: 690upx;
  height: 826upx;
  background-color: #DEEEE3;
  margin-top: 40upx;
  border-radius: 18px;
  border: 4upx solid #fff;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  //justify-content: center;
}

.user {
  width: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 50upx 24upx 0;
}

.user-img {
  width: 140upx;
  height: 140upx;
  border-radius: 50%;
  border: 2upx solid #fff;
  margin-right: 12upx;
}

.user-img image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.user-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 140upx;
}

.username {
  font-size: 44upx;
  font-weight: 600;
  color: #333333;
  margin-bottom: 12upx;
}

.user-desc {
  font-size: 35upx;
  color: #555;
}

.qcode {
  width: 410upx;
  height: 410upx;
  background-color: #fff;
  margin-top: 30upx;
  margin-bottom: 27upx;
}

.qcode image {
  width: 100%;
  height: 100%;
}

.qcode-message {
  font-size: 42upx;
  color: #333;
  font-weight: 500;
}

.status-box-title text {
  color: #FFB144;
}

</style>
